L = []
for x in range(1, 10):
    L.append(2 * x)
print(L)


# 采用python内置列表生成器
L = [2 * x for x in range(1, 10)]
print(L)


# 采用python内置列表生成器,只取那些4的倍数的值
L = [2 * x for x in range(1, 10)if x % 4 == 0]
print(L)
